On the strength of the remarkable development of information communication technologies and semiconductor technologies, the supply and use of various portable electronic devices have rapidly increased. According to the wide supply of electronic devices, the electronic devices support various functions through a link to other electronic devices. The electronic device may transmit/receive data to/from another electronic device (for example, a headset, a speaker, or the like) through a communication connection and thus are able to use a function of the other electronic device. For example, the electronic device may communicate with another electronic device through a short-range communication module (for example, Bluetooth module or the like). The electronic device may transfer a command to the other electronic device and execute a function of the other electronic device.